using System;
using System.Collections.Generic;
using System.Text;
using IdeaDomain.DomainLayer.Entities;

namespace IdeaDomain.ServiceLayer
{
    public interface IIdeaDataService
    {
        /// <summary>
        /// Gets the row by id.
        /// </summary>
        /// <param name="rowId">The row id.</param>
        /// <param name="userId">The user id.</param>
        /// <returns></returns>
        Row GetRowById(int rowId, int userId);

        /// <summary>
        /// Creates the row.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        bool CreateRow(Row row);

        /// <summary>
        /// Updates the row.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        bool UpdateRow(Row row);

        /// <summary>
        /// Deletes the row.
        /// </summary>
        /// <param name="rowId">The row id.</param>
        /// <param name="userId">The user id.</param>
        /// <returns></returns>
        bool DeleteRow(int rowId, int userId);

        /// <summary>
        /// Gets the idea data.
        /// </summary>
        /// <param name="ideaId">The idea id.</param>
        /// <param name="sidx">The sidx.</param>
        /// <param name="sord">The sord.</param>
        /// <param name="page">The page.</param>
        /// <param name="rows">The rows.</param>
        /// <param name="filters">The filters.</param>
        /// <returns></returns>
        IdeaDetail GetIdeaData(int ideaId, string sidx = "R.RowId", string sord = "asc", int page = 0, int rows = 20, string filters = null);

        /// <summary>
        /// Gets the idea data.
        /// </summary>
        /// <param name="idea">The idea.</param>
        /// <param name="sidx">The sidx.</param>
        /// <param name="sord">The sord.</param>
        /// <param name="page">The page.</param>
        /// <param name="rows">The rows.</param>
        /// <param name="filters">The filters.</param>
        /// <returns></returns>
        IdeaDetail GetIdeaData(Idea idea, string sidx = "R.RowId", string sord = "asc", int page = 0, int rows = 20, string filters = null);

        /// <summary>
        /// Counts the idea rows.
        /// </summary>
        /// <param name="idea">The idea.</param>
        /// <param name="filters">The filters.</param>
        /// <returns></returns>
        int CountIdeaRows(Idea idea, string filters);
    }
}
